home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / Visual Cafe Pro v1.0 / SAMPLES.BIN / Animator.java < prev    next >
Encoding:
Java Source  |  1996-12-03  |  3.6 KB  |  85 lines

  1. /*
  2.     A basic extension of the java.applet.Applet class
  3.  */
  4.  
  5. import java.awt.*;
  6. import java.applet.*;
  7.  
  8. public class Animator extends Applet {
  9.  
  10.     public void init() {
  11.         super.init();
  12.  
  13.         // Take out this line if you don't use symantec.itools.net.RelativeURL
  14.         symantec.itools.lang.Context.setDocumentBase(getDocumentBase());
  15.  
  16.         //{{INIT_CONTROLS
  17.         setLayout(null);
  18.         addNotify();
  19.         resize(426,266);
  20.         setBackground(new Color(16758016));
  21.         animator1 = new symantec.itools.multimedia.Animator();
  22.         animator1.reshape(41,34,353,86);
  23.         add(animator1);
  24.         animator1.setDelay(70);
  25.         try {
  26.             java.net.URL[] tempURL = new java.net.URL[38];
  27.             tempURL[0] = symantec.itools.net.RelativeURL.getURL("1.GIF");
  28.             tempURL[1] = symantec.itools.net.RelativeURL.getURL("2.GIF");
  29.             tempURL[2] = symantec.itools.net.RelativeURL.getURL("3.GIF");
  30.             tempURL[3] = symantec.itools.net.RelativeURL.getURL("4.GIF");
  31.             tempURL[4] = symantec.itools.net.RelativeURL.getURL("5.GIF");
  32.             tempURL[5] = symantec.itools.net.RelativeURL.getURL("6.GIF");
  33.             tempURL[6] = symantec.itools.net.RelativeURL.getURL("7.GIF");
  34.             tempURL[7] = symantec.itools.net.RelativeURL.getURL("8.GIF");
  35.             tempURL[8] = symantec.itools.net.RelativeURL.getURL("9.GIF");
  36.             tempURL[9] = symantec.itools.net.RelativeURL.getURL("10.GIF");
  37.             tempURL[10] = symantec.itools.net.RelativeURL.getURL("11.GIF");
  38.             tempURL[11] = symantec.itools.net.RelativeURL.getURL("12.GIF");
  39.             tempURL[12] = symantec.itools.net.RelativeURL.getURL("13.GIF");
  40.             tempURL[13] = symantec.itools.net.RelativeURL.getURL("14.GIF");
  41.             tempURL[14] = symantec.itools.net.RelativeURL.getURL("15.GIF");
  42.             tempURL[15] = symantec.itools.net.RelativeURL.getURL("16.GIF");
  43.             tempURL[16] = symantec.itools.net.RelativeURL.getURL("17.GIF");
  44.             tempURL[17] = symantec.itools.net.RelativeURL.getURL("18.GIF");
  45.             tempURL[18] = symantec.itools.net.RelativeURL.getURL("19.GIF");
  46.             tempURL[19] = symantec.itools.net.RelativeURL.getURL("20.GIF");
  47.             tempURL[20] = symantec.itools.net.RelativeURL.getURL("21.GIF");
  48.             tempURL[21] = symantec.itools.net.RelativeURL.getURL("22.GIF");
  49.             tempURL[22] = symantec.itools.net.RelativeURL.getURL("23.GIF");
  50.             tempURL[23] = symantec.itools.net.RelativeURL.getURL("24.GIF");
  51.             tempURL[24] = symantec.itools.net.RelativeURL.getURL("25.GIF");
  52.             tempURL[25] = symantec.itools.net.RelativeURL.getURL("26.GIF");
  53.             tempURL[26] = symantec.itools.net.RelativeURL.getURL("27.GIF");
  54.             tempURL[27] = symantec.itools.net.RelativeURL.getURL("28.GIF");
  55.             tempURL[28] = symantec.itools.net.RelativeURL.getURL("29.GIF");
  56.             tempURL[29] = symantec.itools.net.RelativeURL.getURL("30.GIF");
  57.             tempURL[30] = symantec.itools.net.RelativeURL.getURL("31.GIF");
  58.             tempURL[31] = symantec.itools.net.RelativeURL.getURL("32.GIF");
  59.             tempURL[32] = symantec.itools.net.RelativeURL.getURL("33.GIF");
  60.             tempURL[33] = symantec.itools.net.RelativeURL.getURL("34.GIF");
  61.             tempURL[34] = symantec.itools.net.RelativeURL.getURL("35.GIF");
  62.             tempURL[35] = symantec.itools.net.RelativeURL.getURL("36.GIF");
  63.             tempURL[36] = symantec.itools.net.RelativeURL.getURL("37.GIF");
  64.             tempURL[37] = symantec.itools.net.RelativeURL.getURL("");
  65.             animator1.setImageList(tempURL);
  66.         } catch (java.net.MalformedURLException error) {
  67.         }
  68.         animator1.setPreviewMode(true);
  69.         label1 = new java.awt.Label("Visual CafΘ");
  70.         label1.reshape(43,132,360,107);
  71.         label1.setFont(new Font("TimesRoman", Font.BOLD, 64));
  72.         add(label1);
  73.         //}}
  74.     }
  75.  
  76.     public boolean handleEvent(Event event) {
  77.         return super.handleEvent(event);
  78.     }
  79.  
  80.     //{{DECLARE_CONTROLS
  81.     symantec.itools.multimedia.Animator animator1;
  82.     java.awt.Label label1;
  83.     //}}
  84. }
  85.